package org.dromara.business.modules.contactForm.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.dromara.business.modules.contactForm.domain.BuContactForm;
import org.dromara.business.modules.contactForm.domain.vo.BuContactFormVo;
import org.dromara.common.mybatis.annotation.DataColumn;
import org.dromara.common.mybatis.annotation.DataPermission;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;

import java.util.Collection;

/**
 * 联系消息Mapper接口
 *
 * @author ckk
 * @date 2025-11-05
 */
@Mapper
public interface BuContactFormMapper extends BaseMapperPlus<BuContactForm, BuContactFormVo> {

    @DataPermission({@DataColumn(key = "userName", value = "create_by")})
    default Page<BuContactFormVo> queryPageList(Page<BuContactForm> page, @Param(Constants.WRAPPER) Wrapper<BuContactForm> queryWrapper) {
        return this.selectVoPage(page, queryWrapper);
    }

    @DataPermission({@DataColumn(key = "userName", value = "create_by")})
    default int deleteWithValidByIds(Collection<Long> ids) {
        return this.deleteByIds(ids);
    }
}
